#pragma once

#include <ClanLib/core.h>
#include <ClanLib/network.h>

namespace Network { class Server; class ServerUser; }

namespace Game
{
	namespace World { namespace Systems { class ZoneSystem; }}

	class GameManager
	{
	public:
		GameManager(Network::Server &server);
		~GameManager();

		void update(const unsigned int &pulse_ms);

		CL_NetGameEventDispatcher_v1<Network::ServerUser*> &getUserGameEvents() { return user_game_events; }

	private:
		void onEventGameRequestStart(const CL_NetGameEvent &e, Network::ServerUser *user);

		Network::Server &server;
		CL_NetGameEventDispatcher_v1<Network::ServerUser*> user_game_events;

		World::Systems::ZoneSystem *zoneSystem; //We only have one zone system for now...
	};
}
